import request from '@/utils/request.js'

//图片添加
export const mediaAddService = (mediaData) => {
  return request.post('/media', mediaData)
}

// 图片列表
export const mediaListService = (params) => {
  return request.get('/media/all', { params: params })
}

// 图片名称搜索（列表）
export const mediaSearchService = (params) => {
  return request.get('/media/search', { params: params })
}

// 图片删除
export const mediaDeleteService = (id) => {
  return request.delete('/media?id=' + id)
}

// 图片修改
export const mediaUpdateService = (mediaData) => {
  return request.put('/media', mediaData)
}